package org.compression.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.model.auth.User;

@Mapper
public interface UserMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(User record);

	int insertSelective(User record);

	User selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(User record);

	int updateByPrimaryKey(User record);


	@Select("select id id,wx_name wxName,login_name loginName, mobile_no mobileNo from sm_user limit #{startIndex},#{endIndex}")
	public List<User> getMembers(@Param("startIndex") long i,@Param("endIndex") long j);

	@Select("select count(1) from sm_user")
	public long getTotal();

	@Select("select  count(1) from sm_user where login_name =#{loginName} and `password`=#{password}")
	public long getHashed(User record);

	@Select("select  login_name loginName,id,password,mobile_no from sm_user where login_name =#{loginName} and `password`=#{password}")
	public User getUser(User record);

	

}